package com.beesphere.products.throttling.tests;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ThreadedUnitOfWork extends TestUnitOfWork {

	private static final long serialVersionUID = -8002627944815736232L;

	private static final Logger logger = LoggerFactory.getLogger (ThreadedUnitOfWork.class);

	@Override
	public Object execute () throws Exception {
		Thread t = new Thread () {
			public void run () {
				while (true) {
					logger.debug ("run...");
				}
			}
		};
		t.setDaemon (true);
		t.start ();
		return "Hello World";
	}

	
	@Override
	public Object getContext () {
		return null;
	}
	
}
